import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author HanleyTang
 * @date 2018-12-13
 */
public class FileDemo {

    public static void main(String[] args) {

    }


    private static List<String> getList(String dir, int n){

        List<String> list = new ArrayList<>();

        File files = new File(dir);
        List<File> fileList = Arrays.asList(files.listFiles());
        for (int i=0; i<fileList.size(); i++){
           fileList.get(i).getAbsolutePath();
           fileList.get(i).length();
        }

        list.subList(n, list.size() - 1);

        return list;


    }
}
